package com.example.ross.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 统一返回格式
 * @author RossZhang
 * @version 1.0
 * @date 2020/7/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@ApiModel("返回统一格式模型")
public class ResultFormat<T> {

    @ApiModelProperty(value = "状态码",required = true)
    private Integer code;

    @ApiModelProperty(value = "提示消息",required = true)
    private String msg;

    @ApiModelProperty(value = "返回内容",required = true)
    private T data;
}
